I2C      SDA:P0.30  SCL:P0.31   mpu6050, hmc5882

DBG_UART_INTERFACE  := 0    # stdout, stdin (UART0)
ERR_UART_INTERFACE  := 0    # stderr        (UART0)
DBG_TEE_INTERFACE   := 1    # stdout copy   (UART1)
ERR_TEE_INTERFACE   := 1    # stderr copy   (UART1)

make BOARD=nrf9160dk_nrf9160 APP=examples/i2c/hmc5883_compass prog

nrf9160dk starting...

nano RTOS (C) 2022-2026 nanortos.com
hmc5883 compass

uart[0] ready
i2c[0] ready

# compass: no calibration data found, using default
dec    +588
inc   +5975
x_min  -287
y_min  -367
z_min  -577
x_max  +308
y_max  +221
z_max  +431
xv_min -500
yv_min -577
xv_max +520
yv_max +431

uart_input started
hmc5883 configured

mpu6050 configured
  Sleep Mode:        Disabled
  Clock Source:      PLL with X axis gyroscope reference
  Gyroscope:         1000 dps, x 27.250  y 78.520  z 45.609
  Accelerometer:     4G, gravity 9.813
  MPU6050_CONFIG     6


inclination={"x":1.714286,"y":1.714286,"a":1.714286}

compass_c={"h": 360.0,"x": -0.242,"y":  1.039,"z":  7.319,"x_raw": -169,"y_raw":  -57,"z_raw": -299,"x_min": -287,"y_min": -367,"z_min": -577,"x_max":  308,"y_max":  221,"z_max":  431,"xv_min": -500,"yv_min": -577,"xv_max":  520,"yv_max":  431,"zero":999,"z_ang":   0,"e":"00"}
compass_i={"dec":  588,"inc": 5975}

compass={"h":  5.9,"x":-0.242,"y": 1.039,"z": 7.319}
compass={"h":119.6,"x":-0.245,"y": 1.072,"z": 9.748}
compass={"h":161.3,"x":-0.245,"y": 1.076,"z": 9.823}
compass={"h":165.0,"x":-0.242,"y": 1.075,"z": 9.830}
compass={"h":165.0,"x":-0.241,"y": 1.078,"z": 9.834}
compass={"h":165.0,"x":-0.243,"y": 1.080,"z": 9.835}
compass={"h":165.0,"x":-0.249,"y": 1.080,"z": 9.836}
compass={"h":165.0,"x":-0.248,"y": 1.073,"z": 9.844}
compass={"h":165.0,"x":-0.246,"y": 1.071,"z": 9.890}
compass={"h":165.0,"x":-0.250,"y": 1.078,"z": 9.937}
